package com.my.ruyi.config;

import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MybatisConfig {
	
	@Bean
	public ConfigurationCustomizer configurationCustomizer() {
		ConfigurationCustomizer configurationCustomizer = new ConfigurationCustomizer() {
			@Override
			public void customize(org.apache.ibatis.session.Configuration arg0) {
				arg0.setObjectWrapperFactory(new MybatisWrapperFactory());
			}
		};
		
		return configurationCustomizer;
	}
}
